﻿using System;
using System.Collections.Generic;

namespace CSJ2K.Util.Collections.Generic
{
    public class RasterDictionary<TValue> : Dictionary<long, TValue>
    {
        long width;
        public long Width
        {
            get
            {
                return width;
            }
        }

        public TValue this[long x, long y]
        {
            get
            {     
                return this[(y * width) + x];
            }
            set
            {
                this[(y * width) + x] = value;
            }
        }

        public RasterDictionary(long width)
        {
            this.width = width;
        }
    }
}
